#!/usr/bin/python

# Parses http://mesu.apple.com/version.xml and extracts the AppleTV OS UpdateURL.

# Implementation by Henric Helbro & Niclas Helbro, atvMod.com

import urllib
from xml.dom import minidom

xml_doc = minidom.parse(urllib.urlopen('http://mesu.apple.com/version.xml'))
download_url = xml_doc.getElementsByTagName('dict')[1].getElementsByTagName('string')[1].firstChild.data
print download_url